<webObject name=D2WListPage>D2W list page</webObject>Then, in the .wod file, bind the hyperlink to the action:
D2WListPage: WOHyperlink { action = d2wList; }The method for linking to a Direct to Web page must return a component (that is, a WOComponent object) that implements the interface appropriate to the required type of page. For example, if you want to link to a dynamically generated list page, the component returned must implement the ListPageInterface interface. Fortunately, the D2W class provides methods that create such components:
public WOComponent d2wList() { ListPageInterface lpi=D2W.factory().listPageForEntityNamed("Movie",session()); lpi.setDataSource(movieDisplayGroup.dataSource()); lpi.setNextPage(this); return (WOComponent)lpi; }Notice that before you return the component, you must set things such as the data source for the component and the page to go to when users click the Return button (setNextPage).
Table of Contents
Next Section